package main
import (
	"fmt"
	"os"
)

func main(){
	key := "MY_GO_VAR"
	value :=  "hello_from_go"

	// set
	if err := os.Setenv(key,value);err != nil {
		fmt.Println("os Setenv err:",err)
		return
	}

	// get
	readValue := os.Getenv(key)
	fmt.Println("read env:",readValue)

	fmt.Println("============Print all env================")
	for _,env := range os.Environ() {
		fmt.Println(env)
	}
}